<%@ page contentType="text/html;charset=UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<c:set var="ctx" value="${pageContext['request'].contextPath}" />
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<script type="text/javascript" src="${ctx}/static/js/jquery-1.7.2.min.js"></script>
<SCRIPT type="text/javascript" src="${ctx }/static/js/jquery-ui-1.8.21.custom.min.js"></SCRIPT>
<script type="text/javascript" src="${ctx}/static/js/hashchange.min.js"></script>
<link type="text/css" href="${ctx }/static/css/flick/jquery-ui-1.8.21.custom.css" rel="stylesheet" />
	
<!-- bootstrap -->
<link rel="stylesheet" type="text/css" media="screen" href="${ctx }/static/bootstrap/css/bootstrap.css">
<script type="text/javascript" src="${ctx }/static/bootstrap/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="${ctx }/static/bootstrap/css/docs.css">

<!-- jalert -->
<link rel="stylesheet" type="text/css" media="screen"
	href="${ctx}/static/jalert/jquery.alerts.css" />
<script src="${ctx}/static/jalert/jquery.alerts.js"
	type="text/javascript"></script>	
	
<SCRIPT type="text/javascript">
$(function() {
	$(window).hashchange(function() {
		var m = location.hash;
		$("#actside_ul li a").removeClass("selected");
		$("#actside_ul li a[href='"+m+"']").addClass("selected");
		m = m.replace("#", "");
		ajax(m);
	});
	var m = location.hash.replace("#","");
	if(m == "") {
		m = "info";
	}
	$("a[href='#"+m+"']").addClass("selected");
	ajax(m);
})
function ajax(m) {
	var right = $("#rightcontainer");
	right.html("<center><br/><br/><br/><br/><br/>努力加载中...<br/><br/><img src='${ctx}/static/image/loading.gif'/></center>");
	$.ajax({ 
		type: "GET", 
		url: "${ctx}/user/home/" + m,
		cache: false,
		success: function (html) {
			right.html(html);
		}
	});
	
	
	$("#bottom").load("${ctx}/bottom");
}
</SCRIPT>
<STYLE type="text/css">
	#bottom {
		margin: 0 auto;
		padding:10px;
		padding-bottom:30px;
	}
</STYLE>
</head>
<body>
<div class="navbar" style="position:absolute;top:0; right:0; left:0;">
    <div class="navbar-inner">
      <div class="container">
        <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </a>
        <a href="${ctx }/" class="brand">~${applicationScope.sysconfig.system_name }~</a>
        <div class="nav-collapse">
          <ul class="nav">
            <shiro:user>
            	<li><a href="${ctx }/">首页</a></li>
            </shiro:user>
            <li><a href="#info"><b>账户信息</b></a></li>
            <li class="dropdown"><a class="dropdown-toggle"
					data-toggle="dropdown" href="#"><b>财产管理</b><b class="caret"></b></a>
					<ul class="dropdown-menu">
						<li><a href="#pay_cash">提现</a></li>
						<li><a href="#order_history">订单返还历史</a></li>
						<li><a href="#money_promote_history">推广返还历史</a></li>
						<li><a href="#money_out_history">账户兑现历史</a></li>
					</ul>
				</li>
            <li><a href="#safe">安全中心</a></li>
          </ul>
          <ul class="nav pull-right">
            <li><a href="#">欢迎：</a></li>
				<shiro:guest>
					<li class="dropdown"><a data-toggle="dropdown"
						class="dropdown-toggle" href="#">游客 <b class="caret"></b></a>
						<ul class="dropdown-menu">
							<li><a href="${ctx }/user/_login">登录</a></li>
							<li><a href="${ctx }/user/_reg_protocol">注册</a></li>
						</ul>
					</li>
				</shiro:guest>
				<shiro:user>
					<li class="dropdown"><a data-toggle="dropdown"
						class="dropdown-toggle" href="#"><shiro:principal/><b class="caret"></b></a>
						<ul class="dropdown-menu">
							<shiro:hasRole name="管理员">
								<li><a href="${ctx }/admin">进入后台</a></li>
							</shiro:hasRole>
							<shiro:lacksRole name="管理员">
								<li><a href="${ctx }/user/home">用户中心</a></li>
							</shiro:lacksRole>
							<li class="divider"></li>
							<li><a href="${ctx }/user/logout">注销</a></li>
						</ul>
					</li>
				</shiro:user>
			</ul>
        </div><!-- /.nav-collapse -->
      </div>
    </div><!-- /navbar-inner -->
  </div>

	<div class="container">
		<div id="rightcontainer" class="well"></div>
	</div>
	<!-- 主显示 -->
	<div id="bottom"></div>
</body>
</html>